﻿using System;
using BSDS.Commands.Commands.Creation;
using BSDS.Commands.Commands.Creation.Implementation;
using BSDS.Commands.Initalization;
using BSDS.Core.Infrastructure.Logging;
using BSDS.Core.Intialization;

namespace BSDS.Service.Commands
{
    public class GeocodeCommandCreatorOverride : ICommandCreatorOverride
    {
        public Type OverridenType
        {
            get { return typeof(GeocodeCommandCreator); }
        }

        public ICommandCreator GetCommandCreatorOverride(BsdsServicesLocator services, Logger logger)
        {
            var geoService = services.GeoService;
            var accountService = services.AccountService;
            var dataRepository = services.DataRepository;
            var jobRepository = services.JobRepository;
            var jobService = services.JobService;
            var uploadService = services.UploadService;

            return new ServiceGeocodingCommandCreator(geoService, accountService, dataRepository, jobRepository, 
                jobService, uploadService, logger);
        }
    }
}